package com.mobclick.android;

import android.content.Context;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.util.Log;

public class u
{
  public static String a(Context paramContext)
  {
    String str1;
    String str2;
    if (paramContext.getPackageManager().checkPermission("android.permission.ACCESS_NETWORK_STATE", paramContext.getPackageName()) != 0)
    {
      str1 = null;
      return str1;
    }
    try
    {
      NetworkInfo localNetworkInfo;
      while (true)
      {
        while (true)
        {
          localNetworkInfo = ((ConnectivityManager)paramContext.getSystemService("connectivity")).getActiveNetworkInfo();
          if (localNetworkInfo != null)
            break;
          str1 = null;
        }
        if (localNetworkInfo.getType() != 1)
          break;
        str1 = null;
      }
      str2 = localNetworkInfo.getExtraInfo();
      if (UmengConstants.testMode)
      {
        Log.i("TAG", "net type:" + str2);
        break label143:
        if ((!(str2.equals("cmwap"))) && (!(str2.equals("3gwap"))))
        {
          boolean bool = str2.equals("uniwap");
          if (!(bool))
            break label138;
        }
        label138: label143: str1 = "10.0.0.172";
      }
    }
    catch (Exception localException)
    {
      do
        while (true)
        {
          localException.printStackTrace();
          str1 = null;
        }
      while (str2 != null);
      str1 = null;
    }
  }
}